<?php 
class setting extends CI_model{

function pagination() {
		$sql = "SELECT COUNT(*) AS count FROM setting";
		$query = $this->db->query($sql);
		foreach ($query->result() as $row) {
			return $row->count;
		}
	}

	function data_pagination($start, $limit) {
		$this->db->order_by('id_setting', 'DESC');
		$this->db->limit($limit, $start);
		$query = $this->db->get("setting");
		return $query->result();
	}

}